#ifndef WES_VISA_SERIAL_HEADER
#define WES_VISA_SERIAL_HEADER

#include "visa.h"
#include <string>

struct VISAException
{
    static std::string msg;
};

class ResourceManager
{
public:
	ResourceManager();
	~ResourceManager();
	ViSession getSession() {return ses;};
private:
	ViSession ses;	
};

class Instrument
{
public:
	Instrument(const char* instrumentName = "ASRL1::INSTR");
	~Instrument();
	void setAttribute(long attributeConstant, int attributeValue);	
	ViUInt32 write(char * msg);
	ViUInt32 write(std::string s) {return write( (char *)s.c_str() );};
	std::string read(int numToRead, bool timeoutIsError = true);
private:
	ResourceManager rm;
	ViSession instrum;
};


#endif
